<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>构造函数</title>
		<script>
			function Dog(n,a,color){
				this.namee=n;
				this.age=a;
				this.color=color;
				this.show=function(){
					alert(this.namee+","+this.age+",毛色："+this.color);
				}
			}
			var d=new Dog("大黄",2,"黄");
			d.show();
			var d2=new Dog("哮天犬",20000,"黑");
			d2.show();
			
			alert(d.constructor==Dog);
			alert(d2.constructor==Dog);
		</script>
	</head>
	<body>
	</body>
</html>